<?php

use app\admin\middleware\Token;
use app\admin\middleware\CheckAdmin;
use think\facade\Route;

Route::post('login/login', 'app\admin\controller\Login@login')->allowCrossDomain();

Route::group('login', function () {
    Route::get('info', 'app\admin\controller\Login@info');
    Route::post('logout', 'app\admin\controller\Login@logout');
    Route::post('editSelf', 'app\admin\controller\Login@editSelf');
})->middleware([Token::class, CheckAdmin::class])->allowCrossDomain();

// 头像上传路由
Route::post('admin/avatar/upload', 'app\admin\controller\Upload@uploadAvatar')->middleware([Token::class, CheckAdmin::class])->allowCrossDomain();

